<link rel="stylesheet" type="text/css" href="assets/bootstrap-datepicker/css/datepicker.css" />
<section id="main-content">
  <section class="wrapper">
    <!--state overview end-->
    <div class="row">
      <div class="col-lg-12">
        <div class="alert alert-warning fade in">
          <button data-dismiss="alert" class="close close-sm" type="button">
            <i class="icon-remove"></i>
          </button>
          <strong>备注说明：</strong> 移出项目指物资从哪个项目购买、移出、退还的，即系统退款给哪个项目。
        </div>
        <section class="panel" id="addloc">
          <header class="panel-heading">
            录入物资
          </header>
          <div class="panel-body">
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">物资归属公司</label>
              <div class="col-sm-10">
                <select class="form-control" ng-model="mater.materBelongComp" certus-required>
                  <option ng-repeat="com in compSelect" value="{{com.code}}">{{com.name}}</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">移出项目</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" list="browsersProj" value="" certus-required
                  ng-model="mater.projName" placeholder="自动检索，查询结果较多时候，系统不显示，需要尽量多输入相关字段">
              </div>
              <datalist id="browsersProj" ng-model="selected">
                <option ng-repeat="x in userProjSelect2" value="{{x.projName}}">
              </datalist>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">城市选择</label>
              <div class="col-sm-10">
                <select class="form-control" certus-required ng-model="mater.belongedArea">
                  <option ng-repeat="xx in areaSelect" value="{{xx.code}}">{{xx.name}}</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">物资具体存放地点*</label>
              <div class="col-sm-10">
                <textarea class="form-control" certus-an-limit-length="120" placeholder="字符长度限制(120字以内)"
                  ng-model="mater.materArea"></textarea>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">来源类型</label>
              <div class="col-sm-10">
                <select class="form-control" ng-model="mater.originType" certus-required
                  ng-change="originTypeChange(mater.originType)">
                  <option ng-repeat="ly in originTypeSelect" value="{{ly.code}}">{{ly.name}}</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">物资种类</label>
              <div class="col-sm-10">
                <select class="form-control" ng-model="mater.materType" certus-required
                  ng-change="materNoChange(mater.materType)">
                  <option ng-repeat="mn in materNoSelect" value="{{mn.code}}">{{mn.name}}</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">物资编号</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" certus-required ng-model="mater.materNo"
                  placeholder="用于区别物资，人工填入并保障可区别不同价格的物资(字符长度限制64以内)">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">物资名称</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" certus-required ng-model="mater.materName"
                  certus-an-limit-length="32" placeholder="请输入物资名称(字符长度限制32以内)">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">单价*</label>
              <div class="col-sm-10">
                <div class="input-group">
                  <span class="input-group-addon">￥</span>
                  <input type="text" certus-required class="form-control" certus-an-limit-length-num="30"
                    ng-model="mater.unitPrice">
                  <span class="input-group-addon">元</span>
                </div>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">数量</label>
              <div class="col-sm-10">
                <input type="text" certus-required ng-model="mater.amount" certus-an-limit-length-num="10"
                  class="form-control">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">采购时间</label>
              <div class="col-sm-10">
                <input type="text" id="caiTime" class="form-control">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">备注说明</label>
              <div class="col-sm-10">
                <textarea class="form-control" certus-required ng-model="mater.descr" certus-an-limit-length="120"
                  placeholder="字符长度限制(120字以内)"></textarea>
              </div>
            </div>
          </div>
        </section>

        <section class="panel">
          <div class="panel-body">
            <p class="default-buttons">
              <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
              <a class="button-next  btn btn-success" href="javascript:void(0)" ng-click="confirmTo()">确认录入</a>
            </p>
          </div>
        </section>
      </div>
    </div>
  </section>
</section>
<script type="text/javascript" src="assets/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript">
  // 开始日期
  $('#caiTime').datepicker({
    format: 'yyyy-mm-dd'
  });
  // 结束日期
  $('#workEnd').datepicker({
    format: 'yyyy-mm-dd'
  });
</script>
<script type="text/javascript" src="js/receives/index.js"></script>